﻿using System.Globalization;
using System.Windows.Data;

namespace KxApp.Converters
{
    public class StatusConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {

            if (value is int intValue)
            {
                if (Enum.IsDefined(typeof(Status), intValue))
                {
                    return ((Status)intValue).ToString();
                }
            }
            return string.Empty;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return string.Empty;
        }
    }
}
